package com.ocean.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ocean.system.mapper.OProductSmsphoneMapper;
import com.ocean.system.domain.OProductSmsphone;
import com.ocean.system.service.IOProductSmsphoneService;
import com.ocean.common.core.text.Convert;

/**
 * 短信提醒电话Service业务层处理
 * 
 * @author ocean
 * @date 2025-04-10
 */
@Service
public class OProductSmsphoneServiceImpl implements IOProductSmsphoneService 
{
    @Autowired
    private OProductSmsphoneMapper oProductSmsphoneMapper;

    /**
     * 查询短信提醒电话
     * 
     * @param id 短信提醒电话主键
     * @return 短信提醒电话
     */
    @Override
    public OProductSmsphone selectOProductSmsphoneById(Long id)
    {
        return oProductSmsphoneMapper.selectOProductSmsphoneById(id);
    }

    /**
     * 查询短信提醒电话列表
     * 
     * @param oProductSmsphone 短信提醒电话
     * @return 短信提醒电话
     */
    @Override
    public List<OProductSmsphone> selectOProductSmsphoneList(OProductSmsphone oProductSmsphone)
    {
        return oProductSmsphoneMapper.selectOProductSmsphoneList(oProductSmsphone);
    }

    /**
     * 新增短信提醒电话
     * 
     * @param oProductSmsphone 短信提醒电话
     * @return 结果
     */
    @Override
    public int insertOProductSmsphone(OProductSmsphone oProductSmsphone)
    {
        return oProductSmsphoneMapper.insertOProductSmsphone(oProductSmsphone);
    }

    /**
     * 修改短信提醒电话
     * 
     * @param oProductSmsphone 短信提醒电话
     * @return 结果
     */
    @Override
    public int updateOProductSmsphone(OProductSmsphone oProductSmsphone)
    {
        return oProductSmsphoneMapper.updateOProductSmsphone(oProductSmsphone);
    }

    /**
     * 批量删除短信提醒电话
     * 
     * @param ids 需要删除的短信提醒电话主键
     * @return 结果
     */
    @Override
    public int deleteOProductSmsphoneByIds(String ids)
    {
        return oProductSmsphoneMapper.deleteOProductSmsphoneByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除短信提醒电话信息
     * 
     * @param id 短信提醒电话主键
     * @return 结果
     */
    @Override
    public int deleteOProductSmsphoneById(Long id)
    {
        return oProductSmsphoneMapper.deleteOProductSmsphoneById(id);
    }

    @Override
    public List<OProductSmsphone> selectByPid(String productId) {
        return oProductSmsphoneMapper.selectByPid(productId);
    }

    @Override
    public int upchangeStatus(Integer id,Integer status) {

        return oProductSmsphoneMapper.upchangeStatus(id,status);
    }

    @Override
    public int upchangeStatuscp(String id, Integer status) {
        return oProductSmsphoneMapper.upchangeStatuscp(id,status);
    }

}
